import React,{Component} from 'react';
import ReactDOM from 'react-dom';
import { Layout } from 'antd';
const { Header, Content, Footer } = Layout;
import './css/index.less';
import  Page from './comment/page/page';
import  Nav from './comment/Nav/nav';
import  LoginPop from './comment/login/LoginPop';
class App extends Component {
    constructor(props) {
        super(props);
        this.state = {
            active: 'apple'
        };
    }
    tabpage(key){
        this.setState({
            active:key
        })
    }
  render(){

    return(
        <Layout className="layout">
            <Header>
                <div className="logo" />
                <Nav style={{display:'inline-block'}} active={this.state.active}  click={(key)=>this.tabpage(key)}/>
                <LoginPop/>
            </Header>
            <Content style={{ padding: '0 50px' }}>
                <Page  active={this.state.active} />
            </Content>
            <Footer style={{ textAlign: 'center' }}>
                Demo ©2016 Created by Arvin
            </Footer>
        </Layout>
    );
  }
}

ReactDOM.render(<App />, document.getElementById('root'));
